﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZWZTools.Forms;

namespace ZWZTools
{
    public static class FormHelper
    {
        private static Main _main;

        public static Main main
        {
            get { return _main; }
            set { _main = value; }
        }

        private static VideoParsing _videoParsing;

        public static VideoParsing videoParsing
        {
            get
            {
                if (_videoParsing == null)
                {
                    _videoParsing = new VideoParsing();
                }
                return _videoParsing;
            }
            set { _videoParsing = value; }
        }
        private static VideoEdit _videoEdit;

        public static VideoEdit  videoEdit
        {
            get
            {
                if (_videoEdit == null)
                {
                    _videoEdit = new VideoEdit();
                }
                return _videoEdit;
            }
            set { _videoEdit = value; }
        }
        

        public static void ShowMain(Form form)
        {
            form.Hide();
            main.Show();
            Clear();
        }

        public static void Show(Form form)
        {
            form.Show();
            main.Hide();
            Clear();
        }

        private static void Clear()
        {
            videoParsing = null;
            videoEdit = null;
        }
    }
}
